<!DOCTYPE html>  
<html>  
<head>  
    <meta charset="UTF-8">  
    <title>CheckBox Tree - jQuery EasyUI Demo</title>  
    
    <link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/default/easyui.css">  
    <link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/icon.css">  
    <link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/demo/demo.css">  
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.0.min.js"></script>  
    <script type="text/javascript" src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>    
    
    <style type="text/css">
		.icon-dept{
	     background:url('/images/dept.gif') no-repeat center center;
    }
    .icon-title{
	     background:url('/images/title.gif') no-repeat center center;
    }
		
	</style>
    
</head>  
<body>  
    <h2>CheckBox Tree</h2>  
    <div class="demo-info">  
        <div class="demo-tip icon-tip"></div>  
        <div>Tree nodes with check boxes.</div>  
    </div>  
    <div style="margin:10px 0;">  
        <a href="#" class="easyui-linkbutton" onclick="getChecked()">GetChecked</a>   
        <br/>  
        <input type="checkbox" checked onchange="$('#tt').tree({cascadeCheck:$(this).is(':checked')})">CascadeCheck   
        <input type="checkbox" onchange="$('#tt').tree({onlyLeafCheck:$(this).is(':checked')})">OnlyLeafCheck  
    </div>  
    <ul id="tt" class="easyui-tree" data-options="url:'/auth/systemBranchCompany/extcompanyorg.do?companyId=0',animate:true,checkbox:true"></ul>  
    <script type="text/javascript">  
        function getChecked(){  
            var nodes = $('#tt').tree('getChecked');  
            var s = '';  
            for(var i=0; i<nodes.length; i++){  
                if (s != '') s += ',';  
                s += nodes[i].text;  
            }  
            alert(s);  
        }  
    </script>  
</body>  
</html> 